<CFQUERY NAME="GetRecordAll" DATASOURCE="#client.company_dsn#">
	SELECT  B.DOCNUMBER,B.COURSECODE,B.LECTUREHOURS,B.LABHOURS,b.premiumgradload,b.premium4thprep,b.overload,C.*,A.FACULTYID
	FROM CMFDLSUEPLANTILLA A, CMFDLSUPLANTILLA B, CLKDLSUPLANTILLA C
	WHERE A.DOCNUMBER=B.DOCNUMBER
		AND B.SUBJSECTION=C.SUBJSECTION
		AND B.COURSECODE=C.SUBJECT
		and a.docnumber = '#getentry.docnumber#'
</CFQUERY>
<CFQUERY NAME="GetDeloadAll" DATASOURCE="#client.company_dsn#">
	SELECT A.*,B.*
	FROM CINDLSUEPLNTLADLNG A, CLKDLSUREASONDLDNG B, CMFDLSUEPLANTILLA C
	WHERE A.DOCNUMBER=C.DOCNUMBER
		AND B.DELOADINGCODE=A.DELOADINGCODE
		and a.docnumber = '#getentry.docnumber#'
</CFQUERY>
<CFQUERY NAME="GetEmployeePT" DATASOURCE="#client.company_dsn#">
	SELECT A.PERSONNELIDNO,A.LASTNAME,A.FIRSTNAME,A.MIDDLENAME,A.DEPARTMENTCODE,A.SALUTATION,B.DESCRIPTION AS JOBGRADEDESC
	FROM CMFPA A, CLKJOBGRADE B
	WHERE a.personnelidno = '#getentry.facultyid#'
		and A.JOBGRADECODE=B.JOBGRADECODE
</CFQUERY>

<CFOUTPUT>
<LINK REL="StyleSheet" HREF="#client.common_path#css/style_table.css" TYPE="text/css">
</CFOUTPUT>
<table width="100%" align="center" style="margin-left:2" class="classyTable">
<CFOUTPUT>
<tr height="10"></tr>
<tr>
	<th><div align="center">Name/Rank of Faculty</div></th>
	<th><div align="center">Subjects and <br />Other Loads</div></th>
	<th><div align="center">Section</div></th>
	<th><div align="center">Schedule</div></th>
	<th><div align="center">Room</div></th>
	<th><div align="center">No. of Students</div></th>
	<th><div align="center">Department Offering Subjects</div></th>
	<th><div align="center">Lec. Hours</div></th>
	<th><div align="center">Lab. Hours</div></th>
	<th><div align="center">Fac. Units</div></th>
	<th><div align="center">PREMIUM <br />Graduate Load</div></th>
	<th><div align="center">PREMIUM <br />4th Preparation</div></th>
	<th><div align="center">Overload</div></th>
	<th><div align="center">Remarks</div></th>
</tr>
<tr height="5"></tr>
<TR BGCOLOR = "CLIENT.COLOR_TBLSET2" class="row">
<td rowspan="#getrecordall.recordcount#" align="center">
	#getemployeept.lastname#,#getemployeept.firstname# #getemployeept.middlename# <br />
    (#getemployeept.jobgradedesc#)
</td>
<cfset totallec = 0>
<cfset totallab = 0>
<cfset totalfacunits = 0>
<cfloop query="getrecordall">
		<td><div align="center">#subject#</td>
		<td><div align="center">#subjsection#</td>
		<td><div align="center">
			<cfif days_1 neq "" or begin_1 neq "" or end_1 neq "">#days_1# (#begin_1# - #end_1#)</cfif>
			<cfif days_2 neq "" or begin_2 neq "" or end_2 neq ""><br />#days_2# (#begin_2# - #end_2#)</cfif>
			<cfif days_3 neq "" or begin_3 neq "" or end_3 neq ""><br />#days_3# (#begin_3# - #end_3#)</cfif>		
        </td>
		<td><div align="center">
			<cfif room_1 neq "">#room_1#</cfif>
			<cfif room_2 neq ""><br />#room_2#</cfif>
			<cfif room_3 neq ""><br />#room_3#</cfif>		</td>
		<td><div align="center">#totalcount#</td>
		<td><div align="center">#dept#</td>
		<td><div align="center">#lecturehours#</td>
		<td><div align="center">#labhours#</td>
		<td><div align="center">#fac_units#</td>
		<td><div align="center">#premiumgradload#</td>
		<td><div align="center">#premium4thprep#</td>
		<td><div align="center">#overload#</td>
		<td><div align="center">#htmleditformat(remarks)#</td>
	</tr>
	<tr>
	<cfset totallec = totallec + lecturehours>
	<cfset totalalab = totallab + labhours>
	<cfset totalfacunits = totalfacunits + fac_units>
</cfloop>
<tr>
    <td align="right"><b>Totals:</b></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
    <td>&nbsp;</td>
    <td align="center"><b>#totallec#</b></td>
    <td align="center"><b>#totallab#</b></td>
    <td align="center"><b>#totalfacunits#</b></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
</tr>
</CFOUTPUT>
</TABLE>

	



